package com.youoor.common.base;

import java.util.List;

import org.apache.ibatis.annotations.Param;

public interface BaseMapper<E,EQ,PK> {
    int countByExample(EQ example);

    int deleteByExample(EQ example);

    int deleteByPrimaryKey(PK id);

    int insert(E record);

    int insertSelective(E record);

    List<E> selectByExample(@Param("example") EQ example,@Param("limit") Integer num);
    
    List<E> selectByExamplePage(@Param("example") EQ example,@Param("pageIndex") Integer pageIndex,@Param("limit") Integer num);

    E selectByPrimaryKey(PK id);

    int updateByExampleSelective(@Param("record") E record, @Param("example") EQ example);

    int updateByExample(@Param("record") E record, @Param("example") EQ example);

    int updateByPrimaryKeySelective(E record);

    int updateByPrimaryKey(E record);
}